/*校园论坛主界面*/
▪ {

    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --border: #ddd;
}

body {
    background-color: #f5f8fa;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* 顶部导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--secondary), var(--dark));
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 28px;
    color: var(--primary);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-menu {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 200px;
    display: none;
    z-index: 10;
}

.dropdown.active {
    display: block;
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

.dropdown a:last-child {
    border-bottom: none;
}

.dropdown a:hover {
    background-color: var(--light);
    color: var(--primary);
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background: white;
    padding: 25px 0;
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.new-post-btn {
    background: linear-gradient(135deg, var(--primary), #1a6ca9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    margin: 0 20px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.new-post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.board-list {
    padding: 0 20px;
}

.board-item {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.board-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.board-item.active {
    background-color: rgba(52, 152, 219, 0.15);
    color: var(--primary);
    font-weight: 600;
}

.board-item i {
    font-size: 20px;
    width: 30px;
    text-align: center;
}

.board-item .board-name {
    flex: 1;
}

.board-item .post-count {
    background-color: var(--light);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 14px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.board-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.board-title i {
    font-size: 28px;
    color: var(--primary);
}

.board-title h2 {
    font-size: 24px;
    color: var(--dark);
}

.sort-options select {
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: white;
    font-size: 14px;
}

/* 帖子列表 */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 25px;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--warning), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--dark);
}

.post-time {
    font-size: 13px;
    color: var(--gray);
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary);
}

.post-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.post-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 14px;
}

.post-actions {
    display: flex;
    background-color: var(--light);
    padding: 10px 20px;
    justify-content: space-around;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary);
}

.action-btn i {
    font-size: 18px;
}

.action-btn span {
    font-size: 13px;
    font-weight: 500;
}

/* 个人信息弹窗 */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.profile-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 25px;
    color: white;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.avatar-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.modal-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    font-weight: bold;
    border: 4px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-footer {
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid var(--border);
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    background-color: var(--light);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }
    .post-list {
        grid-template-columns: 1fr;
    }
}
